package cn.szq.concurrent.thread.stop;

import java.util.concurrent.BlockingQueue;

/**
 * @ClassName: Consumer
 * @Description: 消费者
 * @Author: szq
 * @Date: 2021-09-26 18:16:53
 */
public class Consumer {

    BlockingQueue storage;

    public Consumer(BlockingQueue storage){
        this.storage = storage;
    }

    public boolean needMoreNum(){
        if (Math.random() > 0.97){
            return false;
        }
        return true;
    }
}
